package com.blackcat.annotation.inject.config;

import com.blackcat.annotation.inject.dao.UserDao;
import com.blackcat.annotation.repository.BaseDao;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Primary;

/**
 * <p> 描述 :
 * @author : blackcat
 * @date  : 2020/5/25 17:45
*/
@Configuration
@ComponentScan(basePackages = "com.blackcat.annotation.inject")
public class MyConfig {

    @Primary
    @Bean
    public UserDao userDao2() {
		UserDao userDao = new UserDao();
		userDao.setFlag(2);
        return userDao;
    }
}
